'ISO-8859-1',
'ISO-8859-2',
'UTF-16',
- 'UTF-32'
+ 'UTF-32',
+ 'WINDOWS-1250',
+ 'WINDOWS-1251',
+ 'WINDOWS-1252',
+ 'WINDOWS-1253',
+ 'WINDOWS-1254',
+ 'WINDOWS-1255',
+ 'WINDOWS-1256',
+ 'WINDOWS-1257',
+ 'WINDOWS-1258',
];
const SUCCESS = 0;
}
}
- Hooks::run( 'UploadVerifyFile', [ $this, $mime, &$status ] );
- if ( $status !== true ) {
- return $status;
+ $error = true;
+ Hooks::run( 'UploadVerifyFile', [ $this, $mime, &$error ] );
+ if ( $error !== true ) {
+ if ( !is_array( $error ) ) {
+ $error = [ $error ];
+ }
+ return $error;
}
wfDebug( __METHOD__ . ": all clear; passing.\n" );
* @return UploadStashFile Stashed file
*/
public function stashFile( User $user = null ) {
- // was stashSessionFile
-
$stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash( $user );
$file = $stash->stashFile( $this->mTempPath, $this->getSourceType() );
$this->mLocalFile = $file;
* Stash a file in a temporary directory, returning a key which can be used
* to find the file again. See stashFile().
*
+ * @deprecated since 1.28
* @return string File key
*/
public function stashFileGetKey() {
+ wfDeprecated( __METHOD__, '1.28' );
return $this->stashFile()->getFileKey();
}
/**
* alias for stashFileGetKey, for backwards compatibility
*
+ * @deprecated since 1.28
* @return string File key
*/
public function stashSession() {
- return $this->stashFileGetKey();
+ wfDeprecated( __METHOD__, '1.28' );
+ return $this->stashFile()->getFileKey();
}
/**